package com.rmuti.programming.ui;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;

public abstract class BaseView implements UIView {
	public Display display;
	public Shell shell;
	protected Image bgImage;

	public BaseView() {
	}

	public abstract void display();

	void createHeaderMenu() {
		Composite composite = new Composite(shell, SWT.NONE);
		composite.setBackgroundImage(bgImage);
		composite.setBackgroundMode(SWT.INHERIT_FORCE);
		composite.setBounds(0, 0, 385, 55);

		Label label1 = new Label(composite, SWT.NONE);
		label1.setText("ปฏิบัติการเขียนโปรแกรม");
		label1.setForeground(display.getSystemColor(SWT.COLOR_WHITE));
		label1.setLocation(110, 12);
		label1.pack();
	}

	Composite createButtomMenu() {
		Composite composite = new Composite(shell, SWT.NONE);
		composite.setBackgroundImage(bgImage);
		composite.setBackgroundMode(SWT.INHERIT_FORCE);
		composite.setBounds(0, 310, 385, 55);
		return composite;
	}
}
